package ru.ifmo.kis;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import ru.ifmo.kis.domain.Material;

/**
 *
 * @author ivan
 */
public class Main {
    public static void main(String[] args) {
        SessionFactory sf = (new Configuration()).configure().buildSessionFactory();
        Session s = sf.openSession();
        Material m = (Material) s.get(Material.class, 13);
        s.disconnect();

        System.out.println(m.getName());
    }
}

